package com.example.mapper;

import com.example.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ArticleInfoMapper {

    public List<ArticleInfo> getAll();

    //提供三个参数
    public List<ArticleInfo> getArticleInfo(String title, String content, int state);

    public List<ArticleInfo> getArticleInfoo(String title, String content, int state);

    public List<ArticleInfo> getArticleInfo3(String title, String content, int state);

    public int addArticle(String title, String content, int uid, int rcount, int state);

    //修改文章
    public int upArticle(int id, String title, String content);

    //删除文章
    public int delArticleByIds(int[] ids);

    //根据文章id删除文章
    public int delById(int id);

    public ArticleInfo getDetail(int id);

    public  int add(ArticleInfo articleInfo);

    public int updateById(ArticleInfo articleInfo);
}
